package com.ruoyi.vehicleDispatch.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicleDispatch.mapper.DispatchRadiusRuleMapper;
import com.ruoyi.vehicleDispatch.domain.DispatchRadiusRule;
import com.ruoyi.vehicleDispatch.service.IDispatchRadiusRuleService;

/**
 * 派单半径规则Service业务层处理
 * 
 * @author niuyi
 * @date 2025-08-19
 */
@Service
public class DispatchRadiusRuleServiceImpl implements IDispatchRadiusRuleService 
{
    @Autowired
    private DispatchRadiusRuleMapper dispatchRadiusRuleMapper;

    /**
     * 查询派单半径规则
     * 
     * @param ruleId 派单半径规则主键
     * @return 派单半径规则
     */
    @Override
    public DispatchRadiusRule selectDispatchRadiusRuleByRuleId(Integer ruleId)
    {
        return dispatchRadiusRuleMapper.selectDispatchRadiusRuleByRuleId(ruleId);
    }

    /**
     * 查询派单半径规则列表
     * 
     * @param dispatchRadiusRule 派单半径规则
     * @return 派单半径规则
     */
    @Override
    public List<DispatchRadiusRule> selectDispatchRadiusRuleList(DispatchRadiusRule dispatchRadiusRule)
    {
        return dispatchRadiusRuleMapper.selectDispatchRadiusRuleList(dispatchRadiusRule);
    }

    /**
     * 新增派单半径规则
     * 
     * @param dispatchRadiusRule 派单半径规则
     * @return 结果
     */
    @Override
    public int insertDispatchRadiusRule(DispatchRadiusRule dispatchRadiusRule)
    {
        return dispatchRadiusRuleMapper.insertDispatchRadiusRule(dispatchRadiusRule);
    }

    /**
     * 修改派单半径规则
     * 
     * @param dispatchRadiusRule 派单半径规则
     * @return 结果
     */
    @Override
    public int updateDispatchRadiusRule(DispatchRadiusRule dispatchRadiusRule)
    {
        return dispatchRadiusRuleMapper.updateDispatchRadiusRule(dispatchRadiusRule);
    }

    /**
     * 批量删除派单半径规则
     * 
     * @param ruleIds 需要删除的派单半径规则主键
     * @return 结果
     */
    @Override
    public int deleteDispatchRadiusRuleByRuleIds(Integer[] ruleIds)
    {
        return dispatchRadiusRuleMapper.deleteDispatchRadiusRuleByRuleIds(ruleIds);
    }

    /**
     * 删除派单半径规则信息
     * 
     * @param ruleId 派单半径规则主键
     * @return 结果
     */
    @Override
    public int deleteDispatchRadiusRuleByRuleId(Integer ruleId)
    {
        return dispatchRadiusRuleMapper.deleteDispatchRadiusRuleByRuleId(ruleId);
    }
}
